package com.trace.app.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * (Product)表实体类
 *
 * @author lionkliu
 * @since 2024-04-30 13:44:25
 */
@SuppressWarnings("serial")
@Data
@Accessors(chain = true)
@TableName("product")
public class Product implements Serializable {
    @TableField(exist = false)
    private Integer[] rawList;

    @TableId
    private Integer id;

    private String name;

    private Double price;

    private Integer rest;

    //最少购买
    private Integer minNum;

    //保质期
    private String expirationDate;

    //售卖方式
    private String saleMethod;

    //存储方式
    private String storageMethod;

    //净含量
    private String netContent;

    //口味
    private String flavor;

    private String img;

    private String qrCode;

    private Integer cateId;

    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private Integer delFlag;

}
